package com.example.proxy.service;

/**
 * ClassName:OrderServiceImpl
 * Package:com.example.proxy.service
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/10-14:37
 * @Version:v1.0
 */
//目标对象
public class OrderServiceImpl implements OrderService {


    @Override
    public void generate() {//目标方法

        //模拟生成订单的耗时
        try {
            Thread.sleep(1234);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("订单已生成");

    }

    @Override
    public void modify() {
        //模拟生成订单的耗时
        try {
            Thread.sleep(1234);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("订单已修改");

    }

    @Override
    public void detail() {
        //模拟查询订单的耗时
        try {
            Thread.sleep(1234);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("请查看订单详情");
    }

    @Override
    public String getName() {
        System.out.println("getName方法执行了");
        return "张三";
    }
}
